package Control;

import Game.Block;
import Game.Group;
import Game.UnRotatableGroup;

import java.util.ArrayList;

public class GroupGenerator {
    public static Group generateOGroup(int x , int y){
        Group g = new UnRotatableGroup( x , y );
        g.blocks = new ArrayList<>();
        g.blocks.add(new Block(0, 0)) ;
        g.blocks.add(new Block(0, -1)) ;
        g.blocks.add(new Block(1, 0)) ;
        g.blocks.add(new Block(1, -1)) ;
        return g ;
    }
    public static Group generateIGroup(int x , int y){
        Group g = new Group( x , y );
        g.blocks = new ArrayList<>();
        g.blocks.add(new Block(-1,0)) ;
        g.blocks.add(new Block(0,0)) ;
        g.blocks.add(new Block(1,0)) ;
        g.blocks.add(new Block(2,0)) ;
        return g ;
    }
    public static Group generateSGroup(int x , int y){
        Group g = new Group( x , y );
        g.blocks = new ArrayList<>();
        g.blocks.add(new Block(-1,0));
        g.blocks.add(new Block(0,0)) ;
        g.blocks.add(new Block(0,1)) ;
        g.blocks.add(new Block(1,1)) ;
        return g ;
    }
    public static Group generateZGroup(int x, int y){
        Group g = new Group( x , y );
        g.blocks = new ArrayList<>();
        g.blocks.add(new Block(-1,1));
        g.blocks.add(new Block(0,1)) ;
        g.blocks.add(new Block(0,0)) ;
        g.blocks.add(new Block(1,0)) ;
        g.rotate();
        g.rotate();
        return g ;
    }
    public static Group generateTGroup(int x , int y){
        Group g = new Group( x , y );
        g.blocks = new ArrayList<>();
        g.blocks.add(new Block(-1,0));
        g.blocks.add(new Block(0,0)) ;
        g.blocks.add(new Block(1,0)) ;
        g.blocks.add(new Block(0,-1)) ;
        return g ;
    }

    public static void main(String[] args){
        int x , y ;
        x = y = 0 ;
        generateOGroup( x , y );
        generateIGroup( x , y );
        generateSGroup( x , y );
        generateTGroup( x , y );
        generateZGroup( x , y );
    }
}
